// pages/particulars-new/particulars-new.js
var app = getApp();
var com = require('../../common.js');
var wxParse = require('../../wxParse/wxParse.js')
Page({
  data: {
    id: '', 
    statusd: 1
  },
  onLoad: function(options) {
    console.log(options)
    var _this = this
    _this.setData({
      id: options.id
    })
    _this.onCounponInfo()
    setTimeout(() => {
      _this.setData({
        statusd: 0
      })
    }, 1500)
   
  },
  onReady: function() {},
  onShow: function() {},
  onHide: function() {},
  onUnload: function() {},
  onPullDownRefresh: function() {},
  onReachBottom: function() {}, 
  // onShareAppMessage: function() {},
  onCounponInfo() { 
    var _this = this
    com.link(app.link.checks_detail + _this.data.id + '.st', {}, function(res) {
      console.log(res)
      _this.setData({
        info: res.data.data
      })
      wxParse.wxParse('content', 'html', res.data.data.service.coupon.postscript, _this, 5)
    }, 'GET')
  }
})